home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 December / PC Answers December 1995 (disc errors).iso / mxc / flybox3.dir / 00008_MovieScript.ls < prev    next >
Encoding:
Text File  |  1995-05-02  |  6.1 KB  |  150 lines

  1. global currentMovie, gMovNo, gdirmovie, fixPal, gsliderbar, listC, gQuestNo, gPalNo, gStages, gPatt, gNames, gInst, listMTH, gAnsListNo, gSetQuest
  2.  
  3. on startMovie
  4.   if the machineType < 256 then
  5.     openXLib("XPALETTE")
  6.     set fixPal to fixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageBottom)
  7.   end if
  8.   if the machineType >= 256 then
  9.     openXLib("XPALETTE.dll")
  10.     set fixPal to XPALETTE(mnew)
  11.   end if
  12.   set gQuestNo to 0
  13.   repeat with i = 342 to 368
  14.     if the machineType = 256 then
  15.       if the castType of cast i = #text then
  16.         set the textFont of field i to "arial"
  17.         set the textSize of field i to 12
  18.         set the foreColor of cast i to 255
  19.       end if
  20.       next repeat
  21.     end if
  22.     if the colorDepth = 8 then
  23.       set the foreColor of cast i to 255
  24.       next repeat
  25.     end if
  26.     set the foreColor of cast i to 0
  27.   end repeat
  28.   fixPal(mPatchIt)
  29.   set listB to list(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
  30.   set listC to list()
  31.   repeat with i = 1 to 23
  32.     set x to random(count(listB))
  33.     set v to getAt(listB, x)
  34.     deleteAt(listB, x)
  35.     addAt(listC, i, v)
  36.   end repeat
  37. end
  38.  
  39. on randomPosition
  40.   set listA to list(71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84)
  41.   repeat with i = 1 to 14
  42.     puppetSprite(i + 29, 1)
  43.     set x to random(count(listA))
  44.     set v to getAt(listA, x)
  45.     deleteAt(listA, x)
  46.     set the castNum of sprite (i + 32) to v
  47.   end repeat
  48.   if gQuestNo <= 22 then
  49.     set gQuestNo to gQuestNo + 1
  50.     set lQuestNo to getAt(listC, gQuestNo)
  51.     set the castNum of sprite 2 to lQuestNo + 250
  52.     set the castNum of sprite 3 to lQuestNo + 300
  53.     set gSetQuest to lQuestNo + 300
  54.   else
  55.     set gQuestNo to 1
  56.     set lQuestNo to getAt(listC, 1)
  57.     set the castNum of sprite 2 to lQuestNo + 250
  58.     set the castNum of sprite 3 to lQuestNo + 300
  59.     set gSetQuest to lQuestNo + 300
  60.   end if
  61.   set gAnsListNo to lQuestNo
  62.   setAnsList()
  63. end
  64.  
  65. on setAnsList
  66.   global listMTH, gAnsListNo
  67.   if gAnsListNo = 1 then
  68.     set listMTH to list("MTH_001.PIC", "10.TXT", "3Stimu.pict", "Stimu.pict", "16.1.TXT", "3roywul.pict", "22.TXT", "3ELK.PICT", "26.TXT")
  69.   end if
  70.   if gAnsListNo = 2 then
  71.     set listMTH to list("MTH_002.PIC", "10.TXT", "3Stimu.pict", "Stimu.pict", "16.1.TXT", "3roywul.pict", "21.TXT", "3ELK.PICT", "26.TXT")
  72.   end if
  73.   if gAnsListNo = 3 then
  74.     set listMTH to list("MTH_003.PIC", "9.TXT", "3kaufst.pict", "kaufst.pict", "14.1.TXT", "3prince.pict", "20.2.TXT", "3hare.pict", "26.TXT")
  75.   end if
  76.   if gAnsListNo = 4 then
  77.     set listMTH to list("MTH_004.PIC", "9.TXT", "3kaufst.pict", "kaufst.pict", "15.1.TXT", "3prince.pict", "21.TXT", "3hare.pict", "26.TXT")
  78.   end if
  79.   if gAnsListNo = 5 then
  80.     set listMTH to list("MTH_005.PIC", "7.TXT", "3roywul.pict", "roywul.pict", "18.1.TXT", "3elk.pict", "23.TXT", "3prince.pict", "26.TXT")
  81.   end if
  82.   if gAnsListNo = 6 then
  83.     set listMTH to list("MTH_006.PIC", "7.TXT", "3roywul.pict", "roywul.pict", "18.1.TXT", "3elk.pict", "23.TXT", "3prince.pict", "26.TXT")
  84.   end if
  85.   if gAnsListNo = 7 then
  86.     set listMTH to list("MTH_007.PIC", "6.TXT", "3ant.pict", "drwnant.pict", "17a.TXT", "3grass.pict", "17.TXT", "3prince.pict", "26.TXT")
  87.   end if
  88.   if gAnsListNo = 8 then
  89.     set listMTH to list("MTH_008.PIC", "6.TXT", "3grass.pict", "GrssHppr.pict", "17.TXT", "3ant.pict", "17a.TXT", "3roywul.pict", "26.TXT")
  90.   end if
  91.   if gAnsListNo = 9 then
  92.     set listMTH to list("MTH_009.PIC", "5.TXT", "3hare.pict", "hare.pict", "16.2.TXT", "3cad.pict", "25.TXT", "3olive.pict", "26.TXT")
  93.   end if
  94.   if gAnsListNo = 10 then
  95.     set listMTH to list("MTH_010.PIC", "4.TXT", "3cad.pict", "cadpupa.pict", "15.2.TXT", "3olive.pict", "21.TXT", "3hare.pict", "26.TXT")
  96.   end if
  97.   if gAnsListNo = 11 then
  98.     set listMTH to list("MTH_011.PIC", "3.TXT", "3elk.pict", "Elk_hair.pict", "16.3.TXT", "3adams.pict", "20.1.TXT", "3roywul.pict", "22.TXT")
  99.   end if
  100.   if gAnsListNo = 12 then
  101.     set listMTH to list("MTH_012.PIC", "3.TXT", "3elk.pict", "Elk_hair.pict", "16.3.TXT", "3adams.pict", "20.1.TXT", "3roywul.pict", "22.TXT")
  102.   end if
  103.   if gAnsListNo = 13 then
  104.     set listMTH to list("MTH_013.PIC", "2.TXT", "3phe.pict", "Phstl.pict", "15.3.TXT", "3hare.pict", "28.TXT", "3olive.pict", "27.TXT")
  105.   end if
  106.   if gAnsListNo = 14 then
  107.     set listMTH to list("MTH_014.PIC", "2.TXT", "3phe.pict", "Phstl.pict", "15.3.TXT", "3olive.pict", "27.TXT", "3hare.pict", "28.TXT")
  108.   end if
  109.   if gAnsListNo = 15 then
  110.     set listMTH to list("MTH_015.PIC", "1.TXT", "3adams.pict", "Adams.pict", "16.4.TXT", "3elk.pict", "20.4.TXT", "3roywul.pict", "22.TXT")
  111.   end if
  112.   if gAnsListNo = 16 then
  113.     set listMTH to list("MTH_016.PIC", "1.TXT", "3adams.pict", "Adams.pict", "14.2.TXT", "3elk.pict", "21.TXT", "3roywul.pict", "22.TXT")
  114.   end if
  115.   if gAnsListNo = 17 then
  116.     set listMTH to list("MTH_017.PIC", "8.TXT", "3prince.pict", "Prince1.pict", "18.2.TXT", "3hare.pict", "23.TXT", "3roywul.pict", "22.TXT")
  117.   end if
  118.   if gAnsListNo = 18 then
  119.     set listMTH to list("MTH_018.PIC", "8.TXT", "3prince.pict", "Prince1.pict", "18.2.TXT", "3hare.pict", "23.TXT", "3roywul.pict", "22.TXT")
  120.   end if
  121.   if gAnsListNo = 19 then
  122.     set listMTH to list("MTH_019.PIC", "11.TXT", "3wbugg.pict", "Wbugger.pict", "19.TXT", "3prince.pict", "24.TXT", "3kaufst.pict", "26.TXT")
  123.   end if
  124.   if gAnsListNo = 20 then
  125.     set listMTH to list("MTH_020.PIC", "12.TXT", "3cad.pict", "Cadpupa.pict", "15.2.TXT", "3olive.pict", "21.TXT", "nothing.pict", "0.TXT")
  126.   end if
  127.   if gAnsListNo = 21 then
  128.     set listMTH to list("MTH_021.PIC", "12.TXT", "3cad.pict", "Cadpupa.pict", "15.2.TXT", "3olive.pict", "21.TXT", "nothing.pict", "0.TXT")
  129.   end if
  130.   if gAnsListNo = 22 then
  131.     set listMTH to list("MTH_022.PIC", "13.TXT", "3olive.pict", "olive.pict", "15.4.TXT", "3cad.pict", "21.TXT", "nothing.pict", "0.TXT")
  132.   end if
  133.   if gAnsListNo = 23 then
  134.     set listMTH to list("MTH_023.PIC", "13.TXT", "3olive.pict", "olive.pict", "15.4.TXT", "3cad.pict", "21.TXT", "nothing.pict", "0.TXT")
  135.   end if
  136. end
  137.  
  138. on patchPal
  139.   fixPal(mPatchIt)
  140. end
  141.  
  142. on stopMovie
  143.   fixPal(mdispose)
  144.   if the machineType < 256 then
  145.     closeXLib("XPALETTE")
  146.   else
  147.     closeXLib("XPALETTE.dll")
  148.   end if
  149. end
  150.